package com.lou1052.redis.jedis.factorybean.cluster;

import com.lou1052.core.base.annotation.thread.ThreadSafe;
import com.lou1052.redis.jedis.factorybean.AbsJedisCommandsFactory;
import com.lou1052.redis.jedis.source.cluster.JedisClusterSource;
import redis.clients.jedis.JedisCluster;

/**
 * 返回 JedisCluster 全局的 线程安全的
 */
@ThreadSafe
public class JedisClusterFactory extends AbsJedisCommandsFactory<JedisCluster,JedisClusterSource> {

	public JedisClusterFactory(JedisClusterSource jedisClusterSource) {
		super(jedisClusterSource);
	}

	@Override
	public JedisCluster getObject() throws Exception {
		JedisCluster jedisCluster = source.getSource();
		return jedisCluster;
	}
}
